package com.zero.clinic.service.impl;

import com.zero.clinic.mapper.DictionaryMapper;
import com.zero.clinic.pojo.Dictionary;
import com.zero.clinic.pojo.DictionaryExample;
import com.zero.clinic.service.DictionaryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DictionaryServiceImpl implements DictionaryService {

    @Resource
    private DictionaryMapper dictionaryMapper;

    @Override
    public List<Dictionary> selectByExample(DictionaryExample example) {
        return dictionaryMapper.selectByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Long dictionaryId) {
        return dictionaryMapper.deleteByPrimaryKey(dictionaryId);
    }

    @Override
    public int insert(Dictionary record) {
        return dictionaryMapper.insert(record);
    }

    @Override
    public int insertSelective(Dictionary record) {
        return dictionaryMapper.insertSelective(record);
    }

    @Override
    public Dictionary selectByPrimaryKey(Long dictionaryId) {
        return dictionaryMapper.selectByPrimaryKey(dictionaryId);
    }

    @Override
    public int updateByPrimaryKeySelective(Dictionary record) {
        return dictionaryMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int deleteByIds(String[] dictionaryIds) {
        return dictionaryMapper.deleteByIds(dictionaryIds);
    }

    @Override
    public List<Dictionary> selectDictionariesByParentName(String parentName) {
        return dictionaryMapper.selectDictionariesByParentName(parentName);
    }
}
